package org.qqcui.designpattern.patterns.decorator.component;

/**
 * 饮料抽象类
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2022/4/29 10:41
 **/
public abstract class Drink {

    /**
     * 描述
     */
    private String desc;

    /**
     * 价格
     */
    private float price;

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    /**
     * 计算总花费方法，由子类实现
     * @return 总花费
     */
    public abstract float cost();
}
